Scripts can contain literal text information that causes that text to be printed, and it can also contain other kinds of instructions. Literal text information is delimited by quotation marks "". Everything (including whitespace) that appears in this context is interpreted in text mode.
Outside of text mode, instructions are written starting with # followed by the instruction name. If an instruction has parameters, this will be followed by an open paren, a comma-delimited list of parameters, then a close paren.
Common ASCII characters that are available in the game's font simply encode themselves. These are the digits from 0 to 9, the 26 letters of the English alphabet in both upper case and lower case, the following punctation marks: apostrophe (single quote), comma, period, hyphen (minus or dash), exclamation mark, question mark, colon, and forward slash. Spaces and newlines also represent themselves.
The game can encode certain pairs of characters together in one byte. Such pairs are called digraphs. In scripts, saga2edit will automatically use digraphs wherever possible (although in fixed width names which also use the text system, saga2edit won't use digraphs, although they can be inserted explicitly). Saga2edit does not currently support changing the digraph table (although it does read the digraph data from the ROM file). Double newline is also a special case that can be encoded in one byte, though it is not a digraph. Saga2edit will also handle this automatically.
Escape sequences are also available to encode additional glyphs. Escape sequences are delimited by parentheses (which are not available in the font). The following escape sequences are available: (magi), (whip), (rocket), (gun), (copyright), (shield), (dagger), (staff), (spear), (sword), (axe), (bow), (helm), (gauntlet), (armor), (shoe), (book), (potion), and (..).
Two character escape sequences (besides (..)) can be used to explicitly insert digraphs. This will only work if the character pair is actually in the game's digraph table. This also overrides saga2edit's usual digraph handling (and can be used to insert digraphs in places where saga2edit won't normally use them).
Hex escape sequences can be used to directly insert any byte into the data stream. These are written as (x??) where the question marks represent two hexadecimal digits. This is the only way to insert instructions into names. Normally this is not desirable, but it is currently the only way to encode #text-resist (x3c) and #text-weakness (x3d) in that context. Use this feature with caution.
Most instruction parameters are specified as number constants. Number constants can be written in base 10, or base 16 with a preceeding $. (The disassembler will always use base 10.)
There is no mechanism for expression evaluation either in the language or in the assembler.
Some instructions take a direction parameter. These are written as NORTH, SOUTH, EAST, and WEST. It is also possible to use a number constant in contexts that expect a direction.
Conditional instructions involve a test. If the test passes, the next game proceeds to the next instruction as normal. If the test fails, the next four bytes of the script are skipped.
Scripts using conditionals must be careful to work around the four skipped bytes. Different instructions take different numbers of bytes. In the vanilla scripts, the four bytes are almost always #command.script followed by #nop or #end, but this is not required.
The disassembler will put [?] at the start of the line with instructions that are skipped by a previous conditional instruction. The assembler ignores this token.
Theoretically, a conditional can jump into the middle of a multi-byte instruction. This is bad thing (unless you are doing something overly clever), so be careful to avoid this.
Instructions that move the player or NPCs can be chained together. Chained instructions are executed simultaneously. The game will wait for all instructions in a chain to finish before proceeding.
The chainable instructions all start with #command.. The first instruction in a chain is written normally. Subsequent instructions are intructions are prefixed by + instead of the #command. prefix.
Each chain takes one additional byte to encode (to indicate the end of the chain). This is true even for a chain that only has one instructions (so chainable instructions appear to take one extra byte to encode). After the first instruction, each additional instruction in the chain takes one byte less than usual to encode.
There are 32 script variables (numbered from 0 to 31). Each has an integer value between 0 and 15 (inclusive). These variables are global and persisnt (ie stored in saves). Scripts can access these variables through #var-inc, #var-dec, #var-set, and #var-test. The NPC and tile map systems can also reference these variables.
Certain script variables also have special hard-coded meanings. Variable 0 is used for guest party members. If the value is non-zero, the game will recognize the party as having a guest character, and the value is used as an index when setting up a new guest with #guest.
Variable 11 is checked to determine if Odin should offer the party a retry when they are defeated. Odin will be disabled when the value is greater than zero.
Variable 14 controls the result of using the Prism magi.
Variable 24 controls the number of destinations available when using teleportation abilities (like Pegasus or Door).
Variable 29 is used to track if the player is underwater in Apollo's world. The game is hard-coded to clear this variable when the party teleports.
Variable 30 controls certain special effects. 0 means no effect, 1 is the shaking effect, and 2 is the wavy underwater effect. Many game routines backup the value of this variable, set it to 0 (to temporarily turn off effects), then later restore the saved value. For scripts to actually clear this value persistently, they can set the value to 3 which is a special value that will override the backup value with 0.
Variable 31 is used to track if the player is in a vehicle (and which vehicle the player is in).
Instructions take one byte unless otherwise noted.
#endThis ends the script. (If the script was called by another script, it will return to the caller.) Every script must end with an #end instruction. When using conditionals, please ensure that there is an #end that won't be skipped.
#text-rightMove the text cursor one tile to the right.
#text-leftMove the text cursor one tile to the left.
#text-upMove the text cursor one tile up.
#text-downMove the text cursor one tile down.
#text-raw([0-255])Directly copies the given byte value into the text output. This is the only way to get a byte into the text output if it is mapped to an instruction or a digraph. It takes two bytes to encode.
#sprite.player([0-4])Adds a window sprite at the current position of the player character at the given index (with 4 corresponding to the guest). This takes two bytes to encode.
#sprite.argument([0-7])Adds a window sprite at the current position of the monster id at the given index in script_arg_monster ($c73d). This takes two bytes to encode.
#sprite.player-argumentAdds a window sprite at the current position of the player character at the index in player_index ($c709). This takes two bytes to encode.
#encounter([0-255])Starts a battle against the given encounter. If given 255, instead start a random encounter. This takes two bytes to encode.
#icon-trashCopies the four tiles of the trash can icon into the text output.
#promptPauses the script to wait for player input (for example, before closing a text box).
#window-showClears the text window and makes the it visible. (This also happens automatically when outputing text for the first time.)
#window-hideHides the text window. (Usually, this is preceeded by #prompt.)
#window-drawMakes the text window visible without clearing it first. (This also happens automatically when outputing text.)
#npc-refreshRecalculate which NPCs are visible and return all NPCs to their initial positions.
#wait([0-255])Wait the indicates number of frames. (The game runs at 60 frames per second.) This takes two bytes to encode.
#var-inc([0-31])Increment the indicated script variable by one. If the script variable is already at the maximum value of 15, nothing happens. This takes two bytes to encode.
#var-dec([0-31])Decrement the indicated script variable by one. If the script variable is already at the minimum value of 0, nothing happens. This takes two bytes to encode.
#var-set([0-31], [0-15])Change the script variable indicated by the first parameter to the value indicated by the second parameter. This takes three bytes to encode.
#var-test([0-31], [0-15], [0-15])This is a conditional instruction. The test passes if the variable indicated by the first parameter is greater than or equal to the value indicated by the second parameter and less than or equal to the value indicated by the third parameter. This takes three bytes to encode.
#prompt-yes/noThis is a conditional instruction. A dialog box with "Yes" and "No" options is displayed to the player. The test passes if the player selects "Yes".
#item-test([0-255])This is a conditional instruction. The test passes if the party has an item whose id matches the indicated value. The item may be in the main inventory or equipped by any party member (including the guest). This takes two bytes to encode.
#memo-set([0-255])Sets the indicated memo flag (making the corresponding memo item available in the memo menu). This does not execute the corresponding memo script. It takes two bytes to encode.
#command.script([0-511])Executes the indicated script (from bank 1 or bank 2). When the script finishes executing, control returns to the current script. This takes three bytes to encode.
#command.door([0,543])Activates the indicated door. If the parameter is 511, the exit door will be activated instead. This takes three bytes to encode.
#command.battle-door([0,511])Activates the indicated door in battle door mode. Note that only the first 512 doors can be activated by this instruction. This takes three bytes to encode.
#command.audio.music-switch([0, 63])Changes the background music to the indicated track. This takes three bytes to encode.
To determine which music track is associated with which number, it may be helpful to use the in-game sound test feature. To access this feature, press B on the title screen while holding start and select.
#command.audio.music-play([0, 63])Plays the indicated music track without changing the saved background music. When the track finishes (if it finishes) that background music is restored. This takes two bytes to encode.
To determine which music track is associated with which number, it may be helpful to use the in-game sound test feature. To access this feature, press B on the title screen while holding start and select.
#command.audio.sound-play([0, 127])Plays the indicated sound effect. This takes two bytes to encode.
To determine which sound effect is associated with which number, it may be helpful to use the in-game sound test feature. To access this feature, press B on the title screen while holding start and select.
#command.item([0, 255])Adds the item with the indicated id to the party's inventory. This includes a sound effect and a message. If the inventory is full, the party won't get the item, and a "can't carry" message is displayed instead. This takes three bytes to encode.
#command.magi([0, 255])Adds the magi with the indicated id to the party's collection. (In this context, the magi ids start with 0 for power magi.) This includes a sound effect and a message. This takes three bytes to encode.
#command.item-force([0, 255])Adds the item with the indicated id to the party's inventory. This includes a sound effect and a message. If the inventory is full, the player will be prompted to drop an item. This takes three bytes to encode.
#command.player-step(direction)Forces the player to move one step in the indicated direction. This command can be chained. It takes three bytes to encode.
#command.player-move([0, 15], direction)Force the player to move the indicated number of steps in the indicated direction. If the number of steps is zero, the player's facing will still change. This command can be chained. It takes three bytes to encode.
#command.player-slide([0, 15], direction)Force the player to move the indicated number of steps in the indicated direction without changing the player's facing. This command can be chained. It takes three bytes to encode.
#command.player-move-no-camera([0, 15], direction)Force the player to move the indicated number of steps in the indicated direction without moving the camera. This command can be chained. It takes three bytes to encode.
#command.player-slide-no-camera([0, 15], direction)Force the player to move the indicated number of steps in the indicated direction without changing the player's facing or moving the camera. This command can be chained. It takes three bytes to encode.
#command.npc-slide([0, 15], direction, [0, 15])Moves the NPC indicated by the third parameter the number of steps indicated by the first parameter in the indicated direction without changing the NPC's facing. NPCs are indexed based on loaded NPC slots. This command can be chained. It takes four bytes to encode.
#command.npc-move([0, 15], direction, [0, 15])Moves the NPC indicated by the third parameter the number of steps indicated by the first parameter in the indicated direction. If the number of steps is zero, the NPC's facing will still change. NPCs are indexed based on loaded NPC slots. This command can be chained. It takes four bytes to encode.
#command.player-transparency([0, 255])Directly changes the player's transparency flags. Setting these flags will cause the player sprite to draw behind the tile map. The upper half and lower half of the sprite can be controlled separately. Bit 4 ($10) controls the lower half of the sprite and bit 5 ($20) controls the upper half. Other bits of the parameter are ignored. Note that the normal transparency logic will clobber this setting once the player moves. This takes two bytes to encode.
#command.misc.vehicle-stopIf the player is inside a vehicle, this will cause the player to exit the vehicle (as if they had pressed the A button). This is subject to collision detection, so it will not work if the player would exit into a blocked tile. It takes two bytes to encode.
#command.misc.vehicle-start([0-3])Puts the player into the indicated vehicle (at the player's current position). This takes two bytes to encode.
#command.misc.screen-shakeShakes the screen and plays the accompanying sound effect. This takes two bytes to encode.
#command.misc.map-refreshRefreshes the tile map. This can be used when the tile map uses conditions and script variables have changed. It takes two bytes to encode.
#command.misc.screen-wipe-fadeFade out the screen. This takes two bytes to encode.
#command.misc.screen-reverse-wipe-fadeFade in the screen. This takes two bytes to encode.
#command.misc.transition-cornersWipe the screen by splitting into four quadrants and scrolling each quadrant outwards. This also stages the reverse corners wipe as the next reverse wipe (for example, if a door is used). It takes two bytes to encode.
#command.misc.screen-reverse-wipe-cornersReverse wipe the screen by doing the reverse of the corners wipe. This takes two bytes to encode.
#command.misc.screen-flashFlashes the screen and plays the accompanying sound effect. This takes two bytes to encode.
#command.misc.screen-wipe-diamondWipes the screen with an diamond shape the expands from the center of the screen. This takes two bytes to encode.
#command.misc.screen-wipe-scrollWipes the screen by scrolling everything towards the center line. This takes two bytes to encode.
#command.misc.player-hideHide the player sprite. The effect persists until it is reversed by #command.misc.player-show. This takes two bytes to encode.
#command.misc.player-showShow the player sprite (if it has been hidden by #command.misc.player-hide). This takes two bytes to encode.
#command.misc.magi-removeRemoves all of the player's magi. This takes two bytes to encode.
#command.misc.magi-restoreGives the player all the magi. The current magi will be overridden with 9 of each of the first 8 magi, and 1 each of the last 6 magi. This takes two bytes to encode.
#magi-test-count([0-255])This is a conditional instruction. The test passes if the player's magi count is less than or equal to the parameter. This takes two bytes to encode.
#magi-test([0-255])This is a conditional instruction. The test passes if the player has at least one of the magi with the indicated id. (In this context, the magi ids start with 0 for power magi.) This takes two bytes to encode.
#text-magi.argument([0-13])Outputs the name of a magi. The magi id is taken from script_arg_magi ($c7e0) at the indicated index. (In this context, the magi ids start with 0 for power magi.) This takes two bytes to encode.
#text-magi.argument-2([0-15])Outputs the name of a magi. The magi id is taken from script_arg_inventory ($c71d) at the indicated index. (Each element of this array has two bytes; the second byte usual indicates the item usage, but isn't used here.) (In this context, the magi ids start with 0 for power magi.) This takes two bytes to encode.
#text-magi.player-argumentOutputs the name of the magi equipped by the player in player_index ($c709). This takes two bytes to encode.
#text-magi-count.argument([0-13])Outputs the number of a particular magi that the party has collected. The magi id is taken from script_arg_magi ($c7e0) at the indicated index. (In this context, the magi ids start with 0 for power magi.) This takes two bytes to encode.
#text-magi-count.argument([0-15])Outputs the number of a particular magi that the party has collected. The magi id is taken from script_arg_inventory ($c71d) at the indicated index. (Each element of this array has two bytes; the second byte usually indicates the item usage, but isn't used here.) (In this context, the magi ids start with 0 for power magi.) This takes two bytes to encode.
#text-magi-count.player-argumentOutputs the number the party has collected of the magi equipped by the player in player_index ($c709). This takes two bytes to encode.
#text-gp.partyOutputs the party's GP total (followed by "GP").
#text-gp.argument([0-9])Outputs the value of the unsigned integer at the indicated index in script_arg_uint24 ($c745) followed by "GP".
#text-name.ord([0-4])Outputs the name of the player character in the indicated party slot. This respects party ordering. It takes two bytes to encode.
#text-name.abs([0-4])Outputs the name of the indicated player character. This does not respect party ordering, so, for example, 0 always means the main player character. It takes two bytes to encode.
#text-name.argument-battle([0-2])Outputs the name of the a player character. The player index is taken from script_arg_battle ($d906) at the indicated index. (Each element of this array is two bytes long.) This respects party ordering, and it only valid during battle mode. It takes two bytes to encode.
#text-name.argumentOutputs the name of the player character given by player_index ($c709). (Naturally, this respects party ordering.) It takes two bytes to encode.
#text-chompStrips trailing whitespace from whichever text instruction follows.
#text-monster.player([0-4])Outputs the monster name of the player character in the indicated party slot. This takes two bytes to encode.
#text-monster.argument([0-7])Outputs the monster name for the monster id at the indicated index in script_arg_monster ($c73d). This takes two bytes to encode.
#text-monster.argument-battle([0-2])Outputs the monster name for the monster id at the indicated index in script_arg_battle ($d906). (Each element of this array is two bytes long.) This takes two bytes to encode.
#text-monster.player-argumentOutputs the monster name of the player character given by player_index ($c709). This takes two bytes to encode.
#text-monster.enemy([0-2])In battle, outputs the monster name of the enemy in the indicated slot. This takes two bytes to encode.
#text-monster.fixed([0-255])Outputs the monster name corresponding to the indicated monster id. This takes three bytes to encode.
#text-item.argument-slot([0-15])Outputs the name of the item at the indicated index in script_arg_inventory ($c71d) at the indicated index. (Each element of this array has two bytes; the second byte indicates the item usage, but isn't used here.) This takes two bytes to encode.
#text-item.inventory([0-15])Outputs the name of the item at the indicated index in the party's inventory. This takes two bytes to encode.
#text-item.player-0([0-7])Outputs the name of the item at the indicated index in the first player character's equipment. This takes two bytes to encode.
#text-item.player-1([0-7])Outputs the name of the item at the indicated index in the second player character's equipment. This takes two bytes to encode.
#text-item.player-2([0-7])Outputs the name of the item at the indicated index in the third player character's equipment. This takes two bytes to encode.
#text-item.player-3([0-7])Outputs the name of the item at the indicated index in the fourth player character's equipment. This takes two bytes to encode.
#text-item.player-4([0-7])Outputs the name of the item at the indicated index in the guest character's equipment. This takes two bytes to encode.
#text-item.player-argument([0-8])Outputs the name of the item at the indicated index in a player character's equipment. The player is given by player_index ($c709). In battle, this will print an empty string instead of the name for items that can't be used in battle (and the battle.data copy of the inventory is used). The ninth inventory slot is the equipped magi, but this is only valid in battle. This takes two bytes to encode.
#text-item.argument-battle([0-2])Outputs the name of the item at the indicated index in script_arg_battle ($d906). (Each element of this array is two bytes long.) This takes two bytes to encode.
#text-item.fixed([0-255])Outputs the item name corresponding to the indicated item id. This takes three bytes to encode.
#text-item-usage.argument-slot([0-15])Outputs the usage of the item at the indicated index in script_arg_inventory ($c71d) at the indicated index. (Each element of this array has two bytes; the second byte indicates the item usage.) This takes two bytes to encode.
#text-item-usage.inventory([0-15])Outputs the usage of the item at the indicated index in the party's inventory. This takes two bytes to encode.
#text-item-usage.player-0([0-7])Outputs the usage of the item at the indicated index in the first player character's equipment. This takes two bytes to encode.
#text-item-usage.player-1([0-7])Outputs the usage of the item at the indicated index in the second player character's equipment. This takes two bytes to encode.
#text-item-usage.player-2([0-7])Outputs the usage of the item at the indicated index in the third player character's equipment. This takes two bytes to encode.
#text-item-usage.player-3([0-7])Outputs the usage of the item at the indicated index in the fourth player character's equipment. This takes two bytes to encode.
#text-item-usage.player-4([0-7])Outputs the usage of the item at the indicated index in the guest character's equipment. This takes two bytes to encode.
#text-item-usage.player-argument([0-8])Outputs the usage of the item at the indicated index in a player character's equipment. The player is given by player_index ($c709). In battle, this will print an empty string instead of the usage for items that can't be used in battle (and the battle.data copy of the inventory is used). The ninth inventory slot is the equipped magi, but this is only valid in battle. This takes two bytes to encode.
#text-current-hp.player([0-4])Outputs the current HP of the player character in the indicated party slot. If the value is greater than 999, 999 is outputed instead. This takes two bytes to encode.
#text-current-hp.player-argumentOutputs the current HP of the player character given by player_index ($c709). If the value is greater than 999, 999 is outputed instead. This takes two bytes to encode.
#text-max-hp.player([0-4])Outputs the maximum HP of the player character in the indicated party slot. If the value is greater than 999, 999 is outputed instead. This takes two bytes to encode.
#text-max-hp.player-argumentOutputs the maximum HP of the player character given by player_index ($c709). If the value is greater than 999, 999 is outputed instead. This takes two bytes to encode.
#text-uint8([0-15])Outputs the value of the unsigned integer at the given index in script_arg_uint8 ($c70d). If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-str.player([0-4])Outputs the strength of the player character in the indicated party slot. If the value is greater than 999, 999 is outputed instead. This takes two bytes to encode.
#text-str.player-argumentOutputs the strength of the player character given by player_index ($c709). If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-def.player([0-4])Outputs the defense of the player character in the indicated party slot. If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-def.player-argumentOutputs the defense of the player character given by player_index ($c709). If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-agl.player([0-4])Outputs the agility of the player character in the indicated party slot. If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-agl.player-argumentOutputs the agility of the player character given by player_index ($c709). If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-mana.player([0-4])Outputs the mana of the player character in the indicated party slot. If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-mana.player-argumentOutputs the mana of the player character given by player_index ($c709). If the value is greater than 99, 99 is outputed instead. This takes two bytes to encode.
#text-magi-totalOutputs the total number of magi the party has collected. If the value is greater than 99, 99 is outputed instead.
#text-warp([0-15])Outputs the name of the warp (teleport) destination at the indicated index. Unlocked destinations are controlled by script variable $18. If the desination hasn't been unlocked, the name won't be printed, and the last menu cursor will be removed.
#cursorRegisters a menu cursor position at the current text output position.
#text-xOutputs the special "x" character that the game uses to indicate item usage quantity in shops. Note that this glyph is not loaded into the font in map mode. (This is equivalent to #text-raw($74), but shorter to encode.)
#text-uint16([0-2])Outputs the value of the unsigned integer at the given index in script_arg_uint16 ($d900). This takes two bytes to encode.
#nopDoes nothing. (This can be useful to correctly align conditionals.)
#select-force([0-255])Executes the indicated menu script, and does not accept cancellation. This takes two bytes to encode.
#gp-subtract([0-65535])Removes the indicated amount of GP from the party's total. If the party doesn't have enough, the party total is reduced to zero. (Note that the vanilla scripts don't actually test how much GP the party has, and there is no built-in way to do this.) This takes three bytes to encode.
#select-partyPrompts the player to select their remaining three party members (after having chosen a starting character before beginning the game).
#text-gp-n.party([0-6])Outputs the party's GP total followed by "GP". Only the indicated number of digits of the GP total are printed. If the number is out of range, the trailing digits are printed. This takes three bytes to encode.
#text-gp-n.argument([0-9], [0-6])Outputs the value of the unsigned integer at the index in script_arg_uint24 ($c745) indicated by the first parameter, followed by "GP". Only the number of digits indicated by the second parameter are printed. If the number is out of range, the trailing digits are printed. This takes three bytes to encode.
#encounter-checkIf the party was defeated in the most recent encounter, execute script 3, the Odin retry event. However, note that the use of this instruction is unneccesary, as the #encounter instruction already contains the logic for the Odin retry event (and will not proceed if the party is defeated without retrying).
#guestPopulates the guest party member based on the contents of script variable $00.
#cursor-textRegisters a menu cursor position for text entry mode at the current text output position. The associated character will be the character that follows. (Also advances the output position.)
#text-monster-count([0-2])Outputs the number of enemies in the indicated enemy slot in the current encounter. This takes two bytes to encode.
#text-status-or-max-hp.player([0-4])Outputs the maximum HP of the player character in the indicated party slot, or the four letter status effect abbreviation if the character is currently afflicted. If the HP value is greater than 999, 999 is outputed instead. This takes two bytes to encode.
#text-status-or-max-hp.player-argumentOutputs the maximum HP of the player character given by player_index ($c709), or the four letter status effect abbreviation if the character is currently afflicted. If the HP value is greater than 999, 999 is outputed instead. This takes two bytes to encode.
#text-resistOutputs the special circle character that the game uses to indicate elemental resistances. Note that this glyph is not loaded into the font in map mode. (This is equivalent to #text-raw($77), but shorter to encode.)
#text-weakOutputs the special "X" character that the game uses to indicate elemental weaknesses. Note that this glyph is not loaded into the font in map mode. (This is equivalent to #text-raw($78), but shorter to encode.)
#restoreCompletely restore the party (like using an inn). This restores HP, ability usage, and magi usage.
#heal([0-65535])Restores the indicated number of HP to all party members. This takes three bytes to encode.
#memo-clear([0-255])Clears the indicated memo flag (making the corresponding memo item unavailable in the memo menu). This takes two bytes to encode.
#text-memo-bank.fixed([0-15])Outputs the name of the indicated memo bank. This takes two bytes to encode.
#text-memo-bank.argumentOutputs of the name of the memo bank in script_arg_memo_bank ($c7d9). This takes two bytes to encode.
#memo-boxIf the corresponding memo flag is set, display the box for the memo given by script_arg_memo_bank ($c7d9) and script_arg_memo_index ($c7f2).
#stone-testThis is a conditional instruction. The test passes if all four of main party members (not including any guest) are afflicted by the stone status.
#music-test([0-255])This is a conditional instruction. The test passes if the current background music track matches the parameter. This takes two bytes to encode.
#defeated-test([0-255])This is a conditional instruction. The test passes if the number of times the party has been defeated is greater than or equal to the parameter. This takes two bytes to encode.
#order-resetResets the party order. (This is used in the vanilla game to put the main character back in the lead for story purposes.)
#jukeboxExecutes the jukebox menu. This includes displaying the menu, processing it, and changing the background music based on the result.
#battle-graphics-swap([0-255],[0-1])In battle, changes the graphics for the first enemy to the graphics id indicated by the first parameter. If the second parameter is zero, the transitioning wave effect will be used. This takes three bytes to encode.
#text-save.slotOutputs the save slot number of the save slot given in script_arg_save_slot ($c7dd). This takes two bytes to encode.
#text-save.countOutputs the save count of the save slot given in script_arg_save_slot ($c7dd). This takes two bytes to encode.
#text-save.magiOutputs the party's magi count for the save slot given in script_arg_save_slot ($c7dd). This takes two bytes to encode.
#text-save.nameOutputs the main character's name for the save slot given in script_arg_save_slot ($c7dd). This takes two bytes to encode.
#text-save.current-hpOutputs the main character's current HP for the save slot given in script_arg_save_slot ($c7dd). This takes two bytes to encode.
#text-save.status-or-max-hpOutputs the main character's maximum HP for the save slot given in script_arg_save_slot ($c7dd). If the character is afflicted by a status effect, that will be outputed instead. This takes two bytes to encode.
#text-accelerate-disableDisables the player's ability to speed up (or pause) text. (There is no way to turn these features back on; the game uses this during the ending sequence.)
#memo([0-255])Sets the indicated memo flag, then execute the corresponding memo script. This takes two bytes to encode.
#teleport-disableDisables the use of teleporting items and abilities. (There is no way to turn these back on; the game uses this during the ending sequence.)
#game-endDisplays the "The End" banner. The player will subsequently be returned to the main menu.